import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.junit.Test;

import java.io.*;
import java.net.URL;

/**
 * @Author ： ZAG WELL
 * @Date : 2020/12/6
 */
public class test {
    @Test
    public void test() throws IOException, InvalidFormatException {
        InputStream inputStream = new URL("http://qkaru3r44.hn-bkt.clouddn.com/ordersetting_template.xlsx").openStream();
        Workbook wk = new XSSFWorkbook(inputStream);
        System.out.println(wk);
        File file = new File("C:\\Users\\ZAG WELL\\Desktop\\123.xlsx");
        OutputStream outputStream = new FileOutputStream(file);
        wk.write(outputStream);
    }
}
